package cn.wizzer.app.web.commons.ext.websocket.action.msg.group;

import cn.wizzer.app.user.modules.models.vo.ChatUserVO;
import cn.wizzer.app.user.modules.models.vo.GroupMsgVO;
import cn.wizzer.app.user.modules.services.GroupInfoService;
import cn.wizzer.app.web.commons.ext.websocket.filter.TokenFilter;
import cn.wizzer.app.web.commons.ext.websocket.main.action.BaseNettyAction;
import cn.wizzer.app.web.commons.ext.websocket.main.action.NettyAction;
import cn.wizzer.app.web.commons.ext.websocket.main.base.NettyCache;
import cn.wizzer.framework.base.Result;
import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSONObject;
import io.netty.channel.Channel;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

import java.util.List;

@IocBean
@NettyAction(uri = "/group/list",filters = {TokenFilter.class})
public class ListAction extends BaseNettyAction {

    @Inject
    @Reference
    private GroupInfoService groupInfoService;

    @Override
    public Result action(Channel income, JSONObject params) {
        return Result.success(groupInfoService.list(params.getString("appid")));
    }

}
